import {deleteNotice1} from "@/services/deleteNotice"

export default {
    namespoace:'deleteNotice',
    state:{
      data:{
            items:[],
            totalCount:0,
        }
    },
    effects:{
        *deleteNotice1({
            callback,payload
        },{
            call,put
        }){
           const respon = yield call(deleteNotice1,payload); 
           if(callback){
               callback(respon)
           }

           yield put({
               type:"deleteNotice1Info",
               payload:respon
           });
        },

    },
    reducers:{
        deleteNotice1Info(state,action){
            return{
                ...state,
              data:action.payload.result,
            }

        }
    }
}
